<?php

/*

Who likes me? (wholikesme.php)

*/

$page_title = "Who likes me?";
$rank_check = 1;
include "header.inc.php";

$buds = mysql_query("SELECT * FROM buds2 WHERE bud_you = '$userid'");

while ($array = mysql_fetch_array($buds))
{
	$cellcolor = alternate($cellcolor,"#FFFFFF","$reallyLight");
	$bud = fetch("SELECT username,display_name FROM members2 WHERE id = '$array[bud_me]' LIMIT 1");
	$mybuds .= "<TR BGCOLOR=$cellcolor><TD WIDTH=100 HEIGHT=25><p>&nbsp;&nbsp;<a href=user_profile.php?user=$bud[username]&game=$game><b>$bud[display_name]</b></a></p></TD><TD HEIGHT=25><P>$array[bud_note]</P></TD><TD WIDTH=40 HEIGHT=25><p align=center><B><a href=$base_url/buds.php?game=$game&bud=$bud[username]>Add</a></B></p></TD></TR>";
}

if (!$mybuds) { $mybuds = "<tr><td colspan=3><p align=center><i>No one currently has you on their buddy list :(</p></td></tr>"; }

echo <<<END

$openHTML

<p align=center><A HREF="buds.php?game=$game"><B>Back to my buds</B></A></p>

<CENTER>
<TABLE CELLSPACING=0 CELLPADDING=0 WIDTH="95%">
   <TR BGCOLOR="$topAndBottomBG">
      <TD COLSPAN=3>
         <p><font color="$topAndBottomText"><B>People Who Like Me!</B></FONT></p>
      </TD>
   </TR>
   $mybuds
</TABLE>
</CENTER>

$closeHTML

END;

?>